<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象的属性特征</title>
</head>
<body>
    <script>
        let hd = {name:"后盾人",age:18};

        // 查看对象中某一个属性特征
        console.log(JSON.stringify(Object.getOwnPropertyDescriptor(hd,'name'),null,2));


        // 查看对象中所有的属性特征
        console.log(JSON.stringify(Object.getOwnPropertyDescriptors(hd),null,2));
    </script>
</body>
</html>